package org.yzz.auth.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.yzz.auth.domain.Menu;
import org.yzz.auth.mapper.MenuMapper;
import org.yzz.auth.query.MenuQuery;
import org.yzz.auth.service.IMenuService;
import org.yzz.base.service.impl.BaseServiceImpl;

import java.util.List;

@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class MenuServiceImpl extends BaseServiceImpl<Menu> implements IMenuService {
    @Autowired
    private MenuMapper mapper;

    @Override
    public Integer countTotal(MenuQuery menuQuery) {
        return null;
    }

    @Override
    public List<Menu> menuTree() {
        return mapper.menuTree();
    }

    @Override
    public List<Menu> getMenuParent() {
        return mapper.getMenuParent();
    }

    @Override
    public List<Menu> queryMenuTreeByUserId(Long id) {
        return mapper.queryMenuTreeByUserId(id);
    }
}
